package ${basePackage}.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springside.modules.orm.hibernate.Page;

import ${basePackage}.dao.${beanName}DAO;
import ${basePackage}.entity.${beanName};

@Service
@Transactional
public class ${beanName}Service {
    @Autowired
    private ${beanName}DAO dao;

	/**
	 * 删除对象
	 */
	public int deleteByPrimaryKey(String id) {
		return dao.deleteByPrimaryKey(id);
	}

	/**
	 * 插入对象
	 */
	public void insert(${beanName} record) {
		dao.insert(record);
	}

	/**
	 * 获取单个对象
	 */
	public ${beanName} selectByPrimaryKey(String id) {
		return dao.selectByPrimaryKey(id);
	}

	/**
	 * 修改对象
	 */
	public int update(${beanName} record) {
		return dao.update(record);
	}

	/**
	 * 查询已分页对象返回
	 */
	public Page<${beanName}> findAllPage(Page<${beanName}> page, ${beanName} entity) {
		return dao.findAllPage(page, entity);
	}

	/**
	 * 查询已list对象返回
	 */
	public List<${beanName}> findAllList(${beanName} entity) {
		return dao.findAllList(entity);
	}

}